
<#include "/common/head.html"/>

 <div class="easyui-panel addPage" data-options="fit:true,border:false,novalidate:true">
    <form class="easyui-form" id="ff" method="post" data-options="novalidate:true">
        <table class="table1">
        	
            <tr>
           		<th><span>库位编号：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="loc_no" value="" data-options="required:true"></input>
           		</td>
           		<th><span>条码：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="loc_barcode" value="" data-options=""></input>
           		</td>
           		<th><span>库位名称：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="loc_name" value="" data-options="required:true"></input>
           		</td>
            </tr>
            <tr>
           		<th><span>所属仓库:</span></th>
               	<td>
	            	<input class="easyui-combobox" id="storage_no" name="storage_no" value="" data-options="required:true,
	            				valueField: 'id',
   								textField: 'text',
	            				data: [
	            					{id:'', text:''}<#list dictDatastorage_no.keySet() as key>,{id:'${key}', text:'${dictDatastorage_no.get(key)}'}</#list>
	            				]
	            				
	            	" />        	
           		</td>
           		<th><span>库位类型：</span></th>
               	<td>
	            	<input class="easyui-combobox" id="Loc_type" name="Loc_type" value="" data-options="required:true,
	            				valueField: 'id',
   								textField: 'text',
	            				data: [
	            					{id:'', text:''}<#list dictDataLoc_type.keySet() as key>,{id:'${key}', text:'${dictDataLoc_type.get(key)}'}</#list>
	            				]
	            				
	            	" />        	
           		</td>
           		<th><span>长：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="length" value="" data-options=""></input>
           		</td>
            </tr>
            <tr>
           		<th><span>宽：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="width" value="" data-options=""></input>
           		</td>
           		<th><span>高：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="height" value="" data-options=""></input>
           		</td>
           		<th><span>X坐标：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="x" value="" data-options=""></input>
           		</td>
            </tr>
            <tr>
           		<th><span>Y坐标：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="y" value="" data-options=""></input>
           		</td>
           		<th><span>Z坐标：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="z" value="" data-options=""></input>
           		</td>
           		<th><span>是否在用：</span></th>
               	<td>
	            	<input class="easyui-combobox" id="is_use" name="is_use" value="" data-options="required:true,
	            				valueField: 'id',
   								textField: 'text',
	            				data: [
	            					{id:'', text:''}<#list dictDatais_use.keySet() as key>,{id:'${key}', text:'${dictDatais_use.get(key)}'}</#list>
	            				]
	            				
	            	" />        	
           		</td>
            </tr>
            <tr>
           		<th><span>托盘格子数：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="tp_tnum" value="" data-options=""></input>
           		</td>
           		<th><span>使用格子数：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="tp_cnum" value="" data-options=""></input>
           		</td>
            <td colspan="2"></td>
            </tr>
        </table>
    </form>
</div>
<script>
top.window.subPage.save = save;
function save() {
	if($("#ff").form('enableValidation').form('validate')) {
		$.post("add", getParam(), function(data) {
			top.window.closeWindow();
			top.window.subPage.loadCurrDatagrid();
		});
	}
}
function getParam() {
	var param = {
	     
       	    "model.loc_no": $(":input[name='loc_no']").val(), 
       	    "model.loc_barcode": $(":input[name='loc_barcode']").val(), 
       	    "model.loc_name": $(":input[name='loc_name']").val(), 
       	    "model.storage_no": $(":input[name='storage_no']").val(), 
       	    "model.Loc_type": $(":input[name='Loc_type']").val(), 
       	    "model.length": $(":input[name='length']").val(), 
       	    "model.width": $(":input[name='width']").val(), 
       	    "model.height": $(":input[name='height']").val(), 
       	    "model.x": $(":input[name='x']").val(), 
       	    "model.y": $(":input[name='y']").val(), 
       	    "model.z": $(":input[name='z']").val(), 
       	    "model.is_use": $(":input[name='is_use']").val(), 
       	    "model.tp_tnum": $(":input[name='tp_tnum']").val(), 
       	    "model.tp_cnum": $(":input[name='tp_cnum']").val(), 
	}
	for(key in param) {
		if(!param[key]) {
			delete param[key];
		}
	}
	return param;
}

//扩展js
</script>
<#include "/common/foot.html"/>
